 <?php 
 header('Content-Type:text/xml'); 
 //driver functions for php database module, all calls must authenticate;
 include 'db-serializers.php';
 $user=$_POST["user"];
 $pass=$_POST["password"];
 $host=$_POST["host"];
 $operation=$_POST["operation"];
 $dbh=mysql_connect($host,$user,$pass);
 if(isset($_POST["db"])) {
   mysql_select_db($_POST["db"]);
 }
 //if they are just logging in, return
 if($operation=="") {
   echo list_databases();
   exit();
 }
 //if operation is not null, execute it
 $result=mysql_query($operation);
 if(!$result) {
 die(mysql_error());
 }
 echo sqlResult2xml($result);
 ?>